import * as React from 'react'
import { NavLink, withRouter, RouteComponentProps, Link } from 'react-router-dom'
import style from "./style.less"
// import logo from "../../assets/imgs/logo.png"

class Nav extends React.Component<RouteComponentProps> {
  render() {
    return (
      <nav className={style.header}>
        <div className="container">
          <Link to="/" className={style.title}>
            时间胶囊
          </Link>
          <ul className={style.nav}>
            <li>
              <NavLink to="/" className={style.li}>首页</NavLink>
            </li>
            <li>
              <NavLink to="put" className={style.li} activeClassName={style.activeli}>添加</NavLink>
            </li>
            <li className="active">
              <NavLink to="open" className={style.li} activeClassName={style.activeli}>打开</NavLink>
            </li>
          </ul>
        </div>
      </nav>
    )
  }
}

export default withRouter(Nav)
